package com.train.controller;


import com.train.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {
    private UserService service;

    /**
     *
     * @param phone 手机号
     * @param password 密码
     * @return
     */
    @PostMapping("/login")
    public String login(String phone, String password) {
        return service.login(phone,password);
    }
}
